import { IToolTipItem } from "../../../../../com/mui/manager/IToolTipItem";
import { SEntityId } from "../../../../../Message/Public/SEntityId";
import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { ResFileConst } from "../../../resource/ResFileConst";
import { ToolTipsManager } from "../../../../../com/mui/manager/ToolTipsManager";
type int = number;
//class EntityBasePoint
    
    export  class EntityBasePoint /* flash.display.Sprite */ implements IToolTipItem
    {
        constructor()
        {
            
            cacheAsBitmap = true;
            this._bitMap = new Object /* flash.display.Bitmap */();
            addChild(this._bitMap);
            return;
        }

        public get entityId(): SEntityId
        {
            return this._entityId;
        }

        protected onMapUIResLoadedHandler(): void
        {
            this.updatePointView();
            return;
        }

        protected updatePointView(): void
        {
            return;
        }

        public updateData(arg1: Object=null, arg2: uint=16711680, arg3: number=1.5, arg4: number=1): void
        {
            if (arg1 == null) 
            {
                if (this._bitMap.bitmapData) 
                {
                    this._bitMap.bitmapData = null;
                }
                graphics.clear();
                graphics.lineStyle(1, 0);
                graphics.beginFill(arg2, arg4);
                graphics.drawCircle(0, 0, arg3);
                graphics.endFill();
            }
            else 
            {
                this.updateObj(arg1);
                graphics.clear();
                LoaderHelp.addResCallBack(ResFileConst.mapUI, this.onMapUIResLoadedHandler);
                ToolTipsManager.register(this);
            }
            return;
        }

        protected updateObj(arg1: Object): void
        {
            return;
        }

        public updatePosition(arg1: int, arg2: int): void
        {
            this.x = arg1;
            this.y = arg2;
            return;
        }

        public dispose(): void
        {
            ToolTipsManager.unregister(this);
            graphics.clear();
            this._entityId = null;
            this._tooltipData = null;
            return;
        }

        public get toolTipData()
        {
            return;
        }

        public set toolTipData(arg1)
        {
            this._tooltipData = arg1;
            return;
        }

        protected /* var */_entityId: SEntityId;

        protected /* var */_tooltipData;

        protected /* var */_bitMap: Object /* flash.display.Bitmap */;
    }
